package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Map;

public class OrderBackInfo {
    private String id;

    private String orderBackCode;

    private String orderId;

    private String handleTime;

    private String handleUser;

    private String wuliuCount;

    private String orderBackStatus;

    private String remark;

    private String driver ;

    private String baoshuUser;

    private String baoshuTime;

    private String sureUser;

    private String sureTime;

    private String completeUser;

    private String completeTime;
    private String disOrderUser;
    private String disOrderTime;

    private String backOunt;
    private String backNeedCount;

    private String status;

    private Date createTime;

    private Date updateTime;

    private int count;


    private String orderNum;
    private String itemTypeId;
    private String productName;
    private String gradeValue;
    private String customer;
    private String peieceNum;

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "待报数", "1", "待确认", "2", "待入库", "3", "待处理", "4", "已完成");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getOrderBackCode() {
        return orderBackCode;
    }

    public void setOrderBackCode(String orderBackCode) {
        this.orderBackCode = orderBackCode == null ? null : orderBackCode.trim();
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    public String getHandleTime() {
        return handleTime;
    }

    public void setHandleTime(String handleTime) {
        this.handleTime = handleTime == null ? null : handleTime.trim();
    }

    public String getHandleUser() {
        return handleUser;
    }

    public void setHandleUser(String handleUser) {
        this.handleUser = handleUser == null ? null : handleUser.trim();
    }

    public String getWuliuCount() {
        return wuliuCount;
    }

    public void setWuliuCount(String wuliuCount) {
        this.wuliuCount = wuliuCount == null ? null : wuliuCount.trim();
    }

    public String getOrderBackStatusCn() {
        if(StringUtils.equals("5",getOrderBackStatus())){
            return "已取消";
        }
        return STATUSMAP.get(getOrderBackStatus());
    }
    public String getOrderBackStatus() {
        return orderBackStatus;
    }

    public void setOrderBackStatus(String orderBackStatus) {
        this.orderBackStatus = orderBackStatus == null ? null : orderBackStatus.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver == null ? null : driver.trim();
    }

    public String getBaoshuUser() {
        return baoshuUser;
    }

    public void setBaoshuUser(String baoshuUser) {
        this.baoshuUser = baoshuUser == null ? null : baoshuUser.trim();
    }

    public String getBaoshuTime() {
        return baoshuTime;
    }

    public void setBaoshuTime(String baoshuTime) {
        this.baoshuTime = baoshuTime == null ? null : baoshuTime.trim();
    }

    public String getSureUser() {
        return sureUser;
    }

    public void setSureUser(String sureUser) {
        this.sureUser = sureUser == null ? null : sureUser.trim();
    }

    public String getSureTime() {
        return sureTime;
    }

    public void setSureTime(String sureTime) {
        this.sureTime = sureTime == null ? null : sureTime.trim();
    }

    public String getCompleteUser() {
        return completeUser;
    }

    public void setCompleteUser(String completeUser) {
        this.completeUser = completeUser == null ? null : completeUser.trim();
    }

    public String getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(String completeTime) {
        this.completeTime = completeTime == null ? null : completeTime.trim();
    }

    public String getBackOunt() {
        return backOunt;
    }

    public void setBackOunt(String backOunt) {
        this.backOunt = backOunt == null ? null : backOunt.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getItemTypeId() {
        return itemTypeId;
    }

    public void setItemTypeId(String itemTypeId) {
        this.itemTypeId = itemTypeId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getGradeValue() {
        return gradeValue;
    }

    public void setGradeValue(String gradeValue) {
        this.gradeValue = gradeValue;
    }

    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    public String getDisOrderUser() {
        return disOrderUser;
    }

    public void setDisOrderUser(String disOrderUser) {
        this.disOrderUser = disOrderUser;
    }

    public String getDisOrderTime() {
        return disOrderTime;
    }

    public void setDisOrderTime(String disOrderTime) {
        this.disOrderTime = disOrderTime;
    }

    public String getBackNeedCount() {
        return backNeedCount;
    }

    public void setBackNeedCount(String backNeedCount) {
        this.backNeedCount = backNeedCount;
    }

    public String getPeieceNum() {
        return peieceNum;
    }

    public void setPeieceNum(String peieceNum) {
        this.peieceNum = peieceNum;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}